﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FlexFlow.Model
{
    /// <summary>
    /// 表示表单模板的状态
    /// </summary>
    public enum FormTemplateState
    {
        /// <summary>
        /// 模板已创建，但未编译
        /// </summary>
        Created = 0,
        /// <summary>
        /// 模板正在编译
        /// </summary>
        Compiling = 1,
        /// <summary>
        /// 模板编译失败
        /// </summary>
        Error = 2,
        /// <summary>
        /// 模板已编译
        /// </summary>
        Compiled = 3
    }
    /// <summary>
    /// 工作流表单模板
    /// </summary>
    public class FormTemplate : PhysicalModel,INamedPhysicalModel
    {
        /// <summary>
        /// 模板名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 模板的创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 模板的安装用户
        /// </summary>
        public Guid Installer { get; set; }
        /// <summary>
        /// 模板的物理文件ID
        /// </summary>
        public Guid PhysicalFileId { get; set; }
        /// <summary>
        /// 模板的状态
        /// </summary>
        public FormTemplateState State { get; set; }
        /// <summary>
        /// 模板当前的状态消息
        /// </summary>
        public string Message { get; set; }
    }
}
